﻿namespace CKQDJK {
	using System;
	using SuperORM.Attributes;
	using System.ComponentModel;
	
	
	/// <summary>项目处罚</summary>
	[Object("项目处罚", "CKQDJK", "项目处罚")]
	[Browsable(true)]
	[DisplayName("项目处罚")]
	[ReadOnly(false)]
	[Serializable()]
	public class 项目处罚 : SuperORM.BusinessObject {
		
		/// <summary>内部变量：CK_GUID</summary>
		private string m_CK_GUID;
		
		/// <summary>标示属性CK_GUID是否为空的字段。</summary>
		private bool m_IsCK_GUIDNull = true;
		
		/// <summary>内部变量：序号</summary>
		private int m_序号;
		
		/// <summary>标示属性序号是否为空的字段。</summary>
		private bool m_Is序号Null = true;
		
		/// <summary>内部变量：许可证号</summary>
		private string m_许可证号;
		
		/// <summary>标示属性许可证号是否为空的字段。</summary>
		private bool m_Is许可证号Null = true;
		
		/// <summary>内部变量：项目档案号</summary>
		private string m_项目档案号;
		
		/// <summary>标示属性项目档案号是否为空的字段。</summary>
		private bool m_Is项目档案号Null = true;
		
		/// <summary>内部变量：项目处罚日期</summary>
		private System.DateTime m_项目处罚日期;
		
		/// <summary>标示属性项目处罚日期是否为空的字段。</summary>
		private bool m_Is项目处罚日期Null = true;
		
		/// <summary>内部变量：处罚类型</summary>
		private int m_处罚类型;
		
		/// <summary>标示属性处罚类型是否为空的字段。</summary>
		private bool m_Is处罚类型Null = true;
		
		/// <summary>内部变量：处罚金额</summary>
		private double m_处罚金额;
		
		/// <summary>标示属性处罚金额是否为空的字段。</summary>
		private bool m_Is处罚金额Null = true;
		
		/// <summary>内部变量：处罚原因</summary>
		private string m_处罚原因;
		
		/// <summary>标示属性处罚原因是否为空的字段。</summary>
		private bool m_Is处罚原因Null = true;
		
		/// <summary>内部变量：BSM</summary>
		private int m_BSM;
		
		/// <summary>标示属性BSM是否为空的字段。</summary>
		private bool m_IsBSMNull = true;
		
		public static string TypeID = "CKQDJK.项目处罚";
		
		/// <summary>属性CK_GUID</summary>
		[Member("CK_GUID", "CK_GUID", "System.String", 80, false, false, "CK_GUID")]
		[Browsable(true)]
		[DisplayName("CK_GUID")]
		[ReadOnly(false)]
		public string CK_GUID {
			get {
				return this.m_CK_GUID;
			}
			set {
				this.m_CK_GUID = value;
				this.m_IsCK_GUIDNull = false;
			}
		}
		
		/// <summary>属性序号</summary>
		[Member("序号", "序号", "System.Int32", 4, false, false, "序号")]
		[Browsable(true)]
		[DisplayName("序号")]
		[ReadOnly(false)]
		public int 序号 {
			get {
				return this.m_序号;
			}
			set {
				this.m_序号 = value;
				this.m_Is序号Null = false;
			}
		}
		
		/// <summary>属性许可证号</summary>
		[Member("许可证号", "许可证号", "System.String", 50, false, false, "许可证号")]
		[Browsable(true)]
		[DisplayName("许可证号")]
		[ReadOnly(false)]
		public string 许可证号 {
			get {
				return this.m_许可证号;
			}
			set {
				this.m_许可证号 = value;
				this.m_Is许可证号Null = false;
			}
		}
		
		/// <summary>属性项目档案号</summary>
		[Member("项目档案号", "项目档案号", "System.String", 50, false, false, "项目档案号")]
		[Browsable(true)]
		[DisplayName("项目档案号")]
		[ReadOnly(false)]
		public string 项目档案号 {
			get {
				return this.m_项目档案号;
			}
			set {
				this.m_项目档案号 = value;
				this.m_Is项目档案号Null = false;
			}
		}
		
		/// <summary>属性项目处罚日期</summary>
		[Member("项目处罚日期", "项目处罚日期", "System.DateTime", 8, false, false, "项目处罚日期")]
		[Browsable(true)]
		[DisplayName("项目处罚日期")]
		[ReadOnly(false)]
		public System.DateTime 项目处罚日期 {
			get {
				return this.m_项目处罚日期;
			}
			set {
				this.m_项目处罚日期 = value;
				this.m_Is项目处罚日期Null = false;
			}
		}
		
		/// <summary>属性处罚类型</summary>
		[Member("处罚类型", "处罚类型", "System.Int32", 4, false, false, "处罚类型")]
		[Browsable(true)]
		[DisplayName("处罚类型")]
		[ReadOnly(false)]
		public int 处罚类型 {
			get {
				return this.m_处罚类型;
			}
			set {
				this.m_处罚类型 = value;
				this.m_Is处罚类型Null = false;
			}
		}
		
		/// <summary>属性处罚金额</summary>
		[Member("处罚金额", "处罚金额", "System.Double", 8, false, false, "处罚金额")]
		[Browsable(true)]
		[DisplayName("处罚金额")]
		[ReadOnly(false)]
		public double 处罚金额 {
			get {
				return this.m_处罚金额;
			}
			set {
				this.m_处罚金额 = value;
				this.m_Is处罚金额Null = false;
			}
		}
		
		/// <summary>属性处罚原因</summary>
		[Member("处罚原因", "处罚原因", "System.String", -1, false, false, "处罚原因")]
		[Browsable(true)]
		[DisplayName("处罚原因")]
		[ReadOnly(false)]
		public string 处罚原因 {
			get {
				return this.m_处罚原因;
			}
			set {
				this.m_处罚原因 = value;
				this.m_Is处罚原因Null = false;
			}
		}
		
		/// <summary>属性BSM</summary>
		[Member("BSM", "BSM", true, true, "BSM")]
		[Browsable(true)]
		[DisplayName("BSM")]
		[ReadOnly(false)]
		public int BSM {
			get {
				return this.m_BSM;
			}
			set {
				this.m_BSM = value;
				this.m_IsBSMNull = false;
				if ((this.OnOIDChanged != null)) {
					this.OnOIDChanged(this, null);
				}
			}
		}
		
		/// <summary>对象ID发生变化的时候触发的事件</summary>
		public event SuperORM.Attributes.OIDChangedHandler OnOIDChanged;
		
		/// <summary>属性改变的时候</summary>
		public event SuperORM.PropertyChangeHandler PropertyChanged;
		
		// 重载的方法，判断两个对象是否相等，判断条件是两个对象的主键值是否相等。
		public override bool Equals(object obj) {
			项目处罚 项目处罚 = ((项目处罚)(obj));
			if ((项目处罚.BSM == this.m_BSM)) {
				return true;
			}
			else {
				return false;
			}
		}
		
		/// <summary>判断某一个属性是否为空</summary>
		public override bool IsNull(string propname) {
			if (propname.Equals("CK_GUID")) {
				return this.m_IsCK_GUIDNull;
			}
			if (propname.Equals("序号")) {
				return this.m_Is序号Null;
			}
			if (propname.Equals("许可证号")) {
				return this.m_Is许可证号Null;
			}
			if (propname.Equals("项目档案号")) {
				return this.m_Is项目档案号Null;
			}
			if (propname.Equals("项目处罚日期")) {
				return this.m_Is项目处罚日期Null;
			}
			if (propname.Equals("处罚类型")) {
				return this.m_Is处罚类型Null;
			}
			if (propname.Equals("处罚金额")) {
				return this.m_Is处罚金额Null;
			}
			if (propname.Equals("处罚原因")) {
				return this.m_Is处罚原因Null;
			}
			if (propname.Equals("BSM")) {
				return this.m_IsBSMNull;
			}
			return true;
		}
		
		/// <summary>将某个属性设置为空</summary>
		public override void SetNull(string propname) {
			if (propname.Equals("CK_GUID")) {
				this.m_IsCK_GUIDNull = true;
				return;
			}
			if (propname.Equals("序号")) {
				this.m_Is序号Null = true;
				return;
			}
			if (propname.Equals("许可证号")) {
				this.m_Is许可证号Null = true;
				return;
			}
			if (propname.Equals("项目档案号")) {
				this.m_Is项目档案号Null = true;
				return;
			}
			if (propname.Equals("项目处罚日期")) {
				this.m_Is项目处罚日期Null = true;
				return;
			}
			if (propname.Equals("处罚类型")) {
				this.m_Is处罚类型Null = true;
				return;
			}
			if (propname.Equals("处罚金额")) {
				this.m_Is处罚金额Null = true;
				return;
			}
			if (propname.Equals("处罚原因")) {
				this.m_Is处罚原因Null = true;
				return;
			}
			if (propname.Equals("BSM")) {
				this.m_IsBSMNull = true;
				return;
			}
		}
	}
}
